package com.web.graduationpro.model;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "instrument_school")
@SuppressWarnings("all")
public class InstrumentSchool {

	private Integer id;
	private String name;
	private String describe;
	private String address;
	private String information;
	List<InstrumentCourse> instrumentCourses = new ArrayList<InstrumentCourse>();
	List<Teacher> teachers = new ArrayList<Teacher>();
	
	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDescribe() {
		return describe;
	}
	public void setDescribe(String describe) {
		this.describe = describe;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getInformation() {
		return information;
	}
	public void setInformation(String information) {
		this.information = information;
	}
	
	@OneToMany(cascade={CascadeType.PERSIST,CascadeType.MERGE,CascadeType.REFRESH},fetch=FetchType.LAZY,mappedBy="instrumentSchool")
	public List<InstrumentCourse> getInstrumentCourses() {
		return instrumentCourses;
	}
	public void setInstrumentCourses(List<InstrumentCourse> instrumentCourses) {
		this.instrumentCourses = instrumentCourses;
	}
	@OneToMany(cascade={CascadeType.PERSIST,CascadeType.MERGE,CascadeType.REFRESH},fetch=FetchType.LAZY,mappedBy="instrumentSchool")
	public List<Teacher> getTeachers() {
		return teachers;
	}
	public void setTeachers(List<Teacher> teachers) {
		this.teachers = teachers;
	}

}
